package com.lzl.factorymethod;

public class PaymentTest {
    public static void main(String[] args) {
        IPayment ali = new AliPaymentFactory();
        ali.process();
        ali.pay();

        IPayment wecat = new WecatPaymentFactory();
        wecat.process();
        wecat.pay();

        IPayment jd = new JDPaymentFactory();
        jd.process();
        jd.pay();

        IPayment paypal = new PaypalPaymentFactory();
        paypal.process();
        paypal.pay();

        IPayment moneygram = new MoneyGramPaymentFactory();
        moneygram.process();
        moneygram.pay();
    }
}
